﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WFNetLib;

namespace 获得软件校验信息
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            SoftVerifyData svd = SoftVerify.CheckVerifyData(textBox1.Text);
            if (svd == null)
            {
                MessageBox.Show("请求的软件信息没有找到！");
            }
            else
            {
                string str = "请求的软件信息如下:\r\n";
                str += "首次的运行时间:" + svd.FirstTime.ToString("yyyy-MM-dd") + "\r\n";
                str += "现在的运行时间:" + svd.CurTime.ToString("yyyy-MM-dd") + "\r\n";
                str += "已经运行的天数:" + svd.UsedDays.ToString() + "\r\n";
                str += "已经运行的次数:" + svd.UsedTimes.ToString() + "\r\n";
                MessageBox.Show(str);
            }
        }
    }
}
